package com.hyf.weekindicator;

import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

import com.hyf.weekindicator.support.WeekIndicatorView;

public class BindViewPageActivity extends AppCompatActivity {

    private ViewPager viewPager;
    private WeekIndicatorView weekIndicatorView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_bind_view_page);
        viewPager = findViewById(R.id.bind_viewpager);
        weekIndicatorView = findViewById(R.id.viewpager_week_indicator);

        viewPager.setAdapter(new ViewPagerAdapter(this));
        weekIndicatorView.init(viewPager, 2, new WeekIndicatorView.OnItemClickListener() {
            @Override
            public void onItemClick(TextView textView, int position) {

            }
        }).indicatorColor(getResources().getColor(R.color.colorPrimary)).build();
    }
}
